# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.CSS.V1.Model.Attributes do
  @moduledoc """
  Attributes for CSS Product.

  ## Attributes

  *   `productWidth` (*type:* `GoogleApi.CSS.V1.Model.ProductDimension.t`, *default:* `nil`) - The width of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
  *   `ageGroup` (*type:* `String.t`, *default:* `nil`) - Target age group of the item.
  *   `color` (*type:* `String.t`, *default:* `nil`) - Color of the item.
  *   `imageLink` (*type:* `String.t`, *default:* `nil`) - URL of an image of the item.
  *   `headlineOfferPrice` (*type:* `GoogleApi.CSS.V1.Model.Price.t`, *default:* `nil`) - Headline Price of the aggregate offer.
  *   `customLabel1` (*type:* `String.t`, *default:* `nil`) - Custom label 1 for custom grouping of items in a Shopping campaign.
  *   `productHeight` (*type:* `GoogleApi.CSS.V1.Model.ProductDimension.t`, *default:* `nil`) - The height of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
  *   `description` (*type:* `String.t`, *default:* `nil`) - Description of the item.
  *   `productDetails` (*type:* `list(GoogleApi.CSS.V1.Model.ProductDetail.t)`, *default:* `nil`) - Technical specification or additional product details.
  *   `multipack` (*type:* `String.t`, *default:* `nil`) - The number of identical products in a merchant-defined multipack.
  *   `lowPrice` (*type:* `GoogleApi.CSS.V1.Model.Price.t`, *default:* `nil`) - Low Price of the aggregate offer.
  *   `sizeSystem` (*type:* `String.t`, *default:* `nil`) - System in which the size is specified. Recommended for apparel items.
  *   `productLength` (*type:* `GoogleApi.CSS.V1.Model.ProductDimension.t`, *default:* `nil`) - The length of the product in the units provided. The value must be between 0 (exclusive) and 3000 (inclusive).
  *   `headlineOfferShippingPrice` (*type:* `GoogleApi.CSS.V1.Model.Price.t`, *default:* `nil`) - Headline Price of the aggregate offer.
  *   `itemGroupId` (*type:* `String.t`, *default:* `nil`) - Shared identifier for all variants of the same product.
  *   `customLabel3` (*type:* `String.t`, *default:* `nil`) - Custom label 3 for custom grouping of items in a Shopping campaign.
  *   `customLabel2` (*type:* `String.t`, *default:* `nil`) - Custom label 2 for custom grouping of items in a Shopping campaign.
  *   `gtin` (*type:* `String.t`, *default:* `nil`) - Global Trade Item Number ([GTIN](https://support.google.com/merchants/answer/188494#gtin)) of the item.
  *   `size` (*type:* `String.t`, *default:* `nil`) - Size of the item. Only one value is allowed. For variants with different sizes, insert a separate product for each size with the same `itemGroupId` value (see [https://support.google.com/merchants/answer/6324492](size definition)).
  *   `pattern` (*type:* `String.t`, *default:* `nil`) - The item's pattern (e.g. polka dots).
  *   `cppAdsRedirect` (*type:* `String.t`, *default:* `nil`) - Allows advertisers to override the item URL when the product is shown within the context of Product Ads.
  *   `headlineOfferLink` (*type:* `String.t`, *default:* `nil`) - Link to the headline offer.
  *   `headlineOfferInstallment` (*type:* `GoogleApi.CSS.V1.Model.HeadlineOfferInstallment.t`, *default:* `nil`) - Number and amount of installments to pay for an item.
  *   `highPrice` (*type:* `GoogleApi.CSS.V1.Model.Price.t`, *default:* `nil`) - High Price of the aggregate offer.
  *   `numberOfOffers` (*type:* `String.t`, *default:* `nil`) - The number of aggregate offers.
  *   `productTypes` (*type:* `list(String.t)`, *default:* `nil`) - Categories of the item (formatted as in [products data specification](https://support.google.com/merchants/answer/6324406)).
  *   `certifications` (*type:* `list(GoogleApi.CSS.V1.Model.Certification.t)`, *default:* `nil`) - A list of certificates claimed by the CSS for the given product.
  *   `additionalImageLinks` (*type:* `list(String.t)`, *default:* `nil`) - Additional URL of images of the item.
  *   `googleProductCategory` (*type:* `String.t`, *default:* `nil`) - Google's category of the item (see [Google product taxonomy](https://support.google.com/merchants/answer/1705911)). When querying products, this field will contain the user provided value. There is currently no way to get back the auto assigned google product categories through the API.
  *   `customLabel0` (*type:* `String.t`, *default:* `nil`) - Custom label 0 for custom grouping of items in a Shopping campaign.
  *   `cppMobileLink` (*type:* `String.t`, *default:* `nil`) - URL for the mobile-optimized version of the Product Detail Page of the CSS.
  *   `pause` (*type:* `String.t`, *default:* `nil`) - Publication of this item will be temporarily paused.
  *   `mpn` (*type:* `String.t`, *default:* `nil`) - Manufacturer Part Number ([MPN](https://support.google.com/merchants/answer/188494#mpn)) of the item.
  *   `headlineOfferMobileLink` (*type:* `String.t`, *default:* `nil`) - Mobile Link to the headline offer.
  *   `productWeight` (*type:* `GoogleApi.CSS.V1.Model.ProductWeight.t`, *default:* `nil`) - The weight of the product in the units provided. The value must be between 0 (exclusive) and 2000 (inclusive).
  *   `adult` (*type:* `boolean()`, *default:* `nil`) - Set to true if the item is targeted towards adults.
  *   `excludedDestinations` (*type:* `list(String.t)`, *default:* `nil`) - The list of destinations to exclude for this target (corresponds to unchecked check boxes in Merchant Center).
  *   `productHighlights` (*type:* `list(String.t)`, *default:* `nil`) - Bullet points describing the most relevant highlights of a product.
  *   `expirationDate` (*type:* `DateTime.t`, *default:* `nil`) - Date on which the item should expire, as specified upon insertion, in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format. The actual expiration date is exposed in `productstatuses` as [googleExpirationDate](https://support.google.com/merchants/answer/6324499) and might be earlier if `expirationDate` is too far in the future. Note: It may take 2+ days from the expiration date for the item to actually get deleted.
  *   `customLabel4` (*type:* `String.t`, *default:* `nil`) - Custom label 4 for custom grouping of items in a Shopping campaign.
  *   `includedDestinations` (*type:* `list(String.t)`, *default:* `nil`) - The list of destinations to include for this target (corresponds to checked check boxes in Merchant Center). Default destinations are always included unless provided in `excludedDestinations`.
  *   `isBundle` (*type:* `boolean()`, *default:* `nil`) - Whether the item is a merchant-defined bundle. A bundle is a custom grouping of different products sold by a merchant for a single price.
  *   `headlineOfferCondition` (*type:* `String.t`, *default:* `nil`) - Condition of the headline offer.
  *   `material` (*type:* `String.t`, *default:* `nil`) - The material of which the item is made.
  *   `cppLink` (*type:* `String.t`, *default:* `nil`) - URL directly linking to your the Product Detail Page of the CSS.
  *   `brand` (*type:* `String.t`, *default:* `nil`) - Product Related Attributes.[14-36] Brand of the item.
  *   `sizeTypes` (*type:* `list(String.t)`, *default:* `nil`) - The cut of the item. It can be used to represent combined size types for apparel items. Maximum two of size types can be provided (see [https://support.google.com/merchants/answer/6324497](size type)).
  *   `headlineOfferSubscriptionCost` (*type:* `GoogleApi.CSS.V1.Model.HeadlineOfferSubscriptionCost.t`, *default:* `nil`) - Number of periods (months or years) and amount of payment per period for an item with an associated subscription contract.
  *   `title` (*type:* `String.t`, *default:* `nil`) - Title of the item.
  *   `gender` (*type:* `String.t`, *default:* `nil`) - Target gender of the item.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :productWidth => GoogleApi.CSS.V1.Model.ProductDimension.t() | nil,
          :ageGroup => String.t() | nil,
          :color => String.t() | nil,
          :imageLink => String.t() | nil,
          :headlineOfferPrice => GoogleApi.CSS.V1.Model.Price.t() | nil,
          :customLabel1 => String.t() | nil,
          :productHeight => GoogleApi.CSS.V1.Model.ProductDimension.t() | nil,
          :description => String.t() | nil,
          :productDetails => list(GoogleApi.CSS.V1.Model.ProductDetail.t()) | nil,
          :multipack => String.t() | nil,
          :lowPrice => GoogleApi.CSS.V1.Model.Price.t() | nil,
          :sizeSystem => String.t() | nil,
          :productLength => GoogleApi.CSS.V1.Model.ProductDimension.t() | nil,
          :headlineOfferShippingPrice => GoogleApi.CSS.V1.Model.Price.t() | nil,
          :itemGroupId => String.t() | nil,
          :customLabel3 => String.t() | nil,
          :customLabel2 => String.t() | nil,
          :gtin => String.t() | nil,
          :size => String.t() | nil,
          :pattern => String.t() | nil,
          :cppAdsRedirect => String.t() | nil,
          :headlineOfferLink => String.t() | nil,
          :headlineOfferInstallment => GoogleApi.CSS.V1.Model.HeadlineOfferInstallment.t() | nil,
          :highPrice => GoogleApi.CSS.V1.Model.Price.t() | nil,
          :numberOfOffers => String.t() | nil,
          :productTypes => list(String.t()) | nil,
          :certifications => list(GoogleApi.CSS.V1.Model.Certification.t()) | nil,
          :additionalImageLinks => list(String.t()) | nil,
          :googleProductCategory => String.t() | nil,
          :customLabel0 => String.t() | nil,
          :cppMobileLink => String.t() | nil,
          :pause => String.t() | nil,
          :mpn => String.t() | nil,
          :headlineOfferMobileLink => String.t() | nil,
          :productWeight => GoogleApi.CSS.V1.Model.ProductWeight.t() | nil,
          :adult => boolean() | nil,
          :excludedDestinations => list(String.t()) | nil,
          :productHighlights => list(String.t()) | nil,
          :expirationDate => DateTime.t() | nil,
          :customLabel4 => String.t() | nil,
          :includedDestinations => list(String.t()) | nil,
          :isBundle => boolean() | nil,
          :headlineOfferCondition => String.t() | nil,
          :material => String.t() | nil,
          :cppLink => String.t() | nil,
          :brand => String.t() | nil,
          :sizeTypes => list(String.t()) | nil,
          :headlineOfferSubscriptionCost =>
            GoogleApi.CSS.V1.Model.HeadlineOfferSubscriptionCost.t() | nil,
          :title => String.t() | nil,
          :gender => String.t() | nil
        }

  field(:productWidth, as: GoogleApi.CSS.V1.Model.ProductDimension)
  field(:ageGroup)
  field(:color)
  field(:imageLink)
  field(:headlineOfferPrice, as: GoogleApi.CSS.V1.Model.Price)
  field(:customLabel1)
  field(:productHeight, as: GoogleApi.CSS.V1.Model.ProductDimension)
  field(:description)
  field(:productDetails, as: GoogleApi.CSS.V1.Model.ProductDetail, type: :list)
  field(:multipack)
  field(:lowPrice, as: GoogleApi.CSS.V1.Model.Price)
  field(:sizeSystem)
  field(:productLength, as: GoogleApi.CSS.V1.Model.ProductDimension)
  field(:headlineOfferShippingPrice, as: GoogleApi.CSS.V1.Model.Price)
  field(:itemGroupId)
  field(:customLabel3)
  field(:customLabel2)
  field(:gtin)
  field(:size)
  field(:pattern)
  field(:cppAdsRedirect)
  field(:headlineOfferLink)
  field(:headlineOfferInstallment, as: GoogleApi.CSS.V1.Model.HeadlineOfferInstallment)
  field(:highPrice, as: GoogleApi.CSS.V1.Model.Price)
  field(:numberOfOffers)
  field(:productTypes, type: :list)
  field(:certifications, as: GoogleApi.CSS.V1.Model.Certification, type: :list)
  field(:additionalImageLinks, type: :list)
  field(:googleProductCategory)
  field(:customLabel0)
  field(:cppMobileLink)
  field(:pause)
  field(:mpn)
  field(:headlineOfferMobileLink)
  field(:productWeight, as: GoogleApi.CSS.V1.Model.ProductWeight)
  field(:adult)
  field(:excludedDestinations, type: :list)
  field(:productHighlights, type: :list)
  field(:expirationDate, as: DateTime)
  field(:customLabel4)
  field(:includedDestinations, type: :list)
  field(:isBundle)
  field(:headlineOfferCondition)
  field(:material)
  field(:cppLink)
  field(:brand)
  field(:sizeTypes, type: :list)
  field(:headlineOfferSubscriptionCost, as: GoogleApi.CSS.V1.Model.HeadlineOfferSubscriptionCost)
  field(:title)
  field(:gender)
end

defimpl Poison.Decoder, for: GoogleApi.CSS.V1.Model.Attributes do
  def decode(value, options) do
    GoogleApi.CSS.V1.Model.Attributes.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.CSS.V1.Model.Attributes do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
